also be considered REORG operation. Full- REORG the process of the tablea complete REORG The procedure for a table should consist of the following steps:BIND, RUNSTATS, REORG, REORGCHK, RUNSTATS , or REBINDNote: You need to connect to the database before executing this part of the commandWe're not right here .
Tags: http ATI tables migration ble AST monitor hot poolDB2 reorgRunstats:using rmadminPerform runstats on all user tables (reorgchk plus update parameter equals Runstats)$ DB2 REORGCHK UPDATE STATISTICS on table userdoing RUNSTATS ....Reorg:In the results of the check, all tables or partitioned tables with asterisks and indexes need to be reorg rebuilt.$ DB2
match the pagesize of the table. Then, the maintenance personnel can use the statements used to create the table space in the original DB2 to refer to creating their own new table space. Use db2look-d $ dbname-l-e-x-o $ db. Layout
In this way, you can view dB. layout to copy some parameters of the originally created tablespace.
At the end of the execution, because my table is too big, there is still a problem. When my temporary tablespace is re
Issue: In the DB2 database, if you modify the structure of the table, you need to do a reorg operation on the table to get the table state back to normal.
A: There are 4 kinds of operations, you need to do reorg operation of the table
1.) SET DATA TYPE Altered-data-type
However, the following two cases are exceptions and do not require
Question: In the DB2 database, do you need to do a reorg operation on the table to get the table state back to normal when the table's structure is modified?A: There are 4 kinds of operations, you need to do reorg operation of the table1. SET DATA TYPE Altered-data-typeHowever, the following two cases are exceptions and do not require
:
# cd/usr/lpp/db2_07_01/instance
#./db2idrop Instname
List all DB2 instances:
Copy Code code as follows:
# Cd/usr/lpp/db2_07_01/bin
#./db2ilist
Create a catalog for a database
Copy Code code as follows:
$ DB2 Catalog DB Btpdbs On/db2catalog
Canceling a cataloged database Btpdbs
Copy Code code as follows:
$
/usr/lpp/db2_07_01/instance
#./db2idrop Instname
List all DB2 instances:
# Cd/usr/lpp/db2_07_01/bin
#./db2ilist
Create a catalog for a database
$ DB2 Catalog DB Btpdbs On/db2catalog
Canceling a cataloged database Btpdbs
$ DB2 Uncatalog DB Btpdbs
View version
# Db2level
Show current Database Admin instance
$ DB2 Get Ins
from TAB76.IXF of Ixf Commitcount, insert into Achact"DB2 "CREATE table achact_t like Achact"DB2 "Rename table achact_t to Achact"DB2 "INSERT INTO achact_t select * from Achact where txndt>= (select Lstpgdt fromAcmact where Actno=achact.actno) "DB2 get snapshot for Dynaimic SQL on Jining To delete an instance: # cd/us
/db2_07_01/bin#./db2ilistCreating catalogs for databases$ DB2 Catalog DB Btpdbs On/db2catalogCanceling a cataloged database Btpdbs$ DB2 Uncatalog DB BtpdbsView version# Db2levelDisplay the current database management instance$ DB2 Get InstanceSets whether the instance system starts automatically when it starts.$ db2iauto-on Auto-start$ db2iauto-off does not start
$ DB2 Catalog DB Btpdbs On/db2catalogCanceling a cataloged database Btpdbs$ DB2 Uncatalog DB BtpdbsView version# Db2levelDisplay the current database management instance$ DB2 Get InstanceSets whether the instance system starts automatically when it starts.$ db2iauto-on Auto-start$ db2iauto-off does not start automaticallyDatabase Optimization Commands:Reorg, Runs
$ DB2 Catalog DB Btpdbs On/db2catalogCanceling a cataloged database Btpdbs$ DB2 Uncatalog DB BtpdbsView version# Db2levelDisplay the current database management instance$ DB2 Get InstanceSets whether the instance system starts automatically when it starts.$ db2iauto-on Auto-start$ db2iauto-off does not start automaticallyDatabase Optimization Commands:Reorg, Runs
dynaimic SQL on jiningDelete an instance:# Cd/usr/lpp/db2_07_01/instance#./Db2idrop InstNameList all DB2 instances:# Cd/usr/lpp/db2_07_01/bin#./Db2ilistCreate a catalog for a database$ Db2 catalog db btpdbs on/db2catalogCancel the compiled destination database btpdbs$ Db2 uncatalog db btpdbsView version# Db2levelDisplays the current database management instance$
schema_name]
Update statistics: UPDATE the statistical data of a table and determine whether to reorganize the table based on the statistical data.
Current statistics: determines whether to reorganize the table based on the STATISTICS of the CURRENT table.
TABLE table_name: analyze a single TABLE
Table all: analyzes ALL tables in the database.
Table system: Analyze SYSTEM tables
Table user: analyzes all tables in the current USER mode.
# Db2 reorgc
#./Db2ilistCreate a catalog for a database$ DB2 catalog dB btpdbs on/db2catalogCancel the compiled destination database btpdbs$ DB2 uncatalog dB btpdbsView version# Db2levelDisplays the current database management instance$ DB2 get instanceSet whether the instance is automatically started when the system starts.$ Db2iauto-on automatic start$ Db2iauto-off does not
:# Cd/usr/lpp/db2_07_01/bin#./db2ilistCreating catalogs for databases$ DB2 Catalog DB Btpdbs On/db2catalogCanceling a cataloged database Btpdbs$ DB2 Uncatalog DB BtpdbsView version# Db2levelDisplay the current database management instance$ DB2 Get InstanceSets whether the instance system starts automatically when it starts.$ db2iauto-on Auto-start$ db2iauto-off d
Lstpgdt fromAcmact where Actno=achact.actno) "DB2 get snapshot for Dynaimic SQL on JiningTo delete an instance:# cd/usr/lpp/db2_07_01/instance#./db2idrop InstnameList all DB2 instances:# Cd/usr/lpp/db2_07_01/bin#./db2ilistCreating catalogs for databases$ DB2 Catalog DB Btpdbs On/db2catalogCanceling a cataloged database Btpdbs$
command was processed as an SQL statement because it was not
Valid Command Line Processor command. During SQL processing it returned:
SQL0668N Operation not allowed for reason code "7" on table "DB2INST1. EMP ".
SQLSTATE = 57016
Solution:
Check the error code SQL0668N to view the meaning of the specific code "7.
Db2 =>? SQL0668N
SQL0668N Operation not allowed for reason code "
"
Explanation:
Access to table "
Following reason codes "
1 fenced
Fenced
InstnameList all DB2 instances:# Cd/usr/lpp/db2_07_01/bin#./db2ilistCreating catalogs for databases$ DB2 Catalog DB Btpdbs On/db2catalogCanceling a cataloged database Btpdbs$ DB2 Uncatalog DB BtpdbsView version# Db2levelDisplay the current database management instance$ DB2 Get InstanceSets whether the instance system
list packages for all db2 "import from tab76.ixf of ixf Commitcount 5000 insert into achact "db2" create table achact_t like achact "db2" rename table achact_t to achact "db2" insert into achact_t select * from achact where txndt> = (select lstpgdt from acmact where actno = achact. actno) "
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.